CLOUDSTACK-3009: Fixed resource calculation CPU, RAM for accounts.#3012
Conversation
|
I think you should change the view to include this even when it is deleted, instead of changing the joining table/view. What do you think? |
|
@rafaelweingartner potentially it could lead to many bugs. I think the change could some other places to fix. Now it's a small fix, but can transform into a large one. |
|
Can you explain further why (your concerns)?I mean, if logically the result is the same when finding the physical interface, why would this affect other places? |
|
@rafaelweingartner it's not thst issue. It's for resource accounting. |
|
Ops, I was with the other issue in the cache... Sorry ;) |
|
Ok, I looked in the code, and the table is used in some other places, specially the |
|
@rafaelweingartner may we add to 4.11.3 as well? |
|
Sure, but then the process is a little bit different. You need to target 4.11 branch. This will require you to cherry pick your current commit into 4.11. |
|
@rafaelweingartner Ok. then I leave this one too? Or close this one and open for 4.11? |
|
Actually, you can keep using this one. You only need to change the target branch here, and then update your |
|
@rafaelweingartner Ok. Got it. I'll try. Not a git pro, thought... |
|
Ping me on Slack if you get lost. |
|
@rafaelweingartner Please, take a look. Looks like I managed it. |
|
Looks like Jenkins is unhappy with moving merge branch from master to 4.11. |
|
It is a coincidence. It was not a problem because of the changes, but rather a worker that was working as it should. |
|
@bwsw what happened with this PR? I mean, there are now a lot of docker files, and other things that are not related to the change I reviewed. |
|
@rafaelweingartner I want to write additional E2E tests for the code. Thus, I started with Marvin and improved the Dockerfile for the simulator to fit Marvin development needs. It's a WIP work. Please, take a look at the email list for details. |
|
@rafaelweingartner Sorry about that) |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Moved to 4.11.2.0 as it sounds like a critical business issue if resource counts are wrong. |
|
Packaging result: ✔centos6 ✔centos7 ✖debian. JID-2425 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Nevermind, I needed to run test quickly - have implemented minor fixes. |
| ram = int(self.get_resource_amount(RAM_RESOURCE_ID)) | ||
|
|
||
| self.assertEqual(cores, self.services['service_offering_it_1']['cpunumber'] + self.services['service_offering_it_2']['cpunumber']) | ||
| self.assertEqual(ram, self.services['service_offering_it_1']['memory'] + self.services['service_offering_it_2']['memory']) |
There was a problem hiding this comment.
Test LGMT, let's wait for the results
|
Trillian test result (tid-3164)
|
borisstoyanov
left a comment
There was a problem hiding this comment.
^^ this looks like a Trillian problem
2018-11-12 10:24:06,987 DEBUG [c.c.c.CapacityManagerImpl] (API-Job-Executor-34:ctx-cff1820f job-1350 ctx-612653d9 FirstFitRoutingAllocator) (logid:936f6a14) Host: 2 doesn't have cpu capability (cpu:3, speed:1599) to support requested CPU: 4 and requested speed: 100
@bwsw Do you mind if we use 3 CPUs in the offering instead of 4?
Doesn't looks like connected with the test itself, rather an env problem. |
|
@borisstoyanov I don't care, just wanted SOs to vary. |
|
@bwsw yes, you're right, issue is that blueorangutan's environment has hosts with 3 cores and we're requesting 4. Perhaps you could just change the offering to request 3? |
|
@borisstoyanov Done |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✖debian. JID-2431 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-3169)
|
Description
Bug fix for #3009
The view "service_offering_view" doesn't include removed SOs, as a result when SO is removed, the bug happens. The PR introduces a change for resource calculation changing "service_offering_view" to "service_offering" table which has all service offerings.
Must be fixed in:
Fixes: #3009
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?
The code was tested manually by running SQL inside MySQL console.
Marvin tests should be done.